#include <stdio.h>
#include <omp.h>

// apply_complexarg_equivalent2 函数
void apply_complexarg_equivalent2(double A[100 * 100]) {
    for (int i1 = 0; i1 < 100; i1 += 4) {
        for (int j1 = 0; j1 < 100; j1 += 5) {
            for (int i = i1; i < i1 + 4; i += 1) {
                #pragma GCC unroll 5
                for (int j = j1; j < j1 + 5; j += 1) {
                    A[i * 100 + j] += 1;
                }
            }
        }
    }
}

int main() {
    double A[100 * 100];

    // 初始化数组元素为 0
    for (int i = 0; i < 100 * 100; ++i) {
        A[i] = 0;
    }

    // 调用 apply_complexarg_equivalent2 函数
    apply_complexarg_equivalent2(A);

    // 输出部分元素来验证结果
    for (int i = 0; i < 5; ++i) {
        printf("A[%d] = %.2f\n", i, A[i]);
    }

    return 0;
}    
